package ui;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Toolkit;
import java.awt.geom.Point2D;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import td.Enemy;

/*
 * Abstract parent class for EnemyViews.
 * Sets up images for flame, critical hit, and slow effects.
 * */
public abstract class EnemyView extends FieldElementView{

	private Point2D coord;
	JLabel hp;
	JLabel crit;
	JLabel fire;
	JLabel slow;
	
	public EnemyView(Enemy e){
		super(e);
		this.setLayout(new GridBagLayout());
		critImage = Toolkit.getDefaultToolkit().getImage("Images/crit.png");
		fireImage = Toolkit.getDefaultToolkit().getImage("Images/flame.png");
		slowImage = Toolkit.getDefaultToolkit().getImage("Images/slow.png");
		GridBagConstraints gridc = new GridBagConstraints();
		gridc.gridx = 0;
		gridc.gridy = 0;
		gridc.anchor = GridBagConstraints.LAST_LINE_START;
		fire = new JLabel(new ImageIcon(fireImage));
		add(fire, gridc);
		gridc.anchor = GridBagConstraints.LAST_LINE_END;
		slow = new JLabel(new ImageIcon(slowImage));
		add(slow, gridc);
		/*gridc.anchor = GridBagConstraints.FIRST_LINE_START;
		crit = new JLabel(new ImageIcon(critImage));
		add(crit, gridc);*/
	}
	
}
